Skip to content

Conversation

@syphe
Copy link

@syphe syphe commented Sep 3, 2024

The original property on literal nodes is deprecated: https://github.com/glimmerjs/glimmer-vm/blob/10eae7429b702b1e7f5434b91802d5767ff7ad9a/packages/%40glimmer/syntax/lib/v1/legacy-interop.ts#L130

This PR adds a check to see whether the path is one of the literal node paths, and if so does not access the original property

@syphe
Copy link
Author

syphe commented Sep 3, 2024

Could also change the check for literal's to either endsWith 'Literal', or check only for path.node.type === 'PathExpression'


transformStatement(node) {
if (node.path.original === 'local-class') {
if (!this.isNodePathLiteral(node.path) && node.path.original === 'local-class') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we fix this differently by using either .original or .value?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly it's been so long since I've looked at this issue, I can't tell you what I expected to see anymore, but suspect it was just the warning "spew" as you say in your attempt.

@RobbieTheWagner
Copy link
Contributor

RobbieTheWagner commented Apr 21, 2025

This was my attempted fix #322

@syphe
Copy link
Author

syphe commented Jul 1, 2025

Closing this as it's already been fixed in this merge: https://github.com/salsify/ember-css-modules/pull/323/files

@syphe syphe closed this Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants